package com.ruoyi.imports.domain;

import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.ruoyi.imports.anno.ExcelColumn;
import com.ruoyi.imports.anno.ExcelSheet;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@ExcelSheet("工艺参数监测表")
public class OperatingExcelData implements Serializable {

    private static final long serialVersionUID = 1L;
    @ExcelColumn(header = {"日期"}, order = 0, required = true)
    @DateTimeFormat("yyyy年MM月dd日")
    @ColumnWidth(15)
    private String date;

    @ExcelColumn(header = {"时间"}, order = 1, required = true)
    @DateTimeFormat("HH:mm")
    @ColumnWidth(10)
    private String time;


    @ExcelColumn(header = {"流量(m³/h)", "剩余氨水"}, order = 2)
    @ColumnWidth(12)
    private BigDecimal shengYuAnShui;

    @ExcelColumn(header = {"流量(m³/h)", "蒸氨废水"}, order = 3)
    @ColumnWidth(12)
    private BigDecimal zhengAnFeiShui;

    @ExcelColumn(header = {"流量(m³/h)", "其他废水"}, order = 4)
    @ColumnWidth(12)
    private BigDecimal qiTaFeiShui;

    @ExcelColumn(header = {"流量(m³/h)", "稀释水"}, order = 5)
    @ColumnWidth(12)
    private BigDecimal xiShiShui;

    @ExcelColumn(header = {"流量(m³/h)", "生化进水", "A系进水"}, order = 6)
    @ColumnWidth(12)
    private BigDecimal liuLiangShengHuaA;

    @ExcelColumn(header = {"流量(m³/h)", "生化进水", "B系进水"}, order = 7)
    @ColumnWidth(12)
    private BigDecimal liuLiangShengHuaB;

    @ExcelColumn(header = {"流量(m³/h)", "一级硝化液回流", "A系回流"}, order = 8)
    @ColumnWidth(12)
    private BigDecimal liuLiangYiJiXiaoHuaA;

    @ExcelColumn(header = {"流量(m³/h)", "一级硝化液回流", "B系回流"}, order = 9)
    @ColumnWidth(12)
    private BigDecimal liuLiangYiJiXiaoHuaB;

    @ExcelColumn(header = {"流量(m³/h)", "一级污泥回流", "A系回流"}, order = 10)
    @ColumnWidth(12)
    private BigDecimal liuLiangYiJiWuNiA;

    @ExcelColumn(header = {"流量(m³/h)", "一级污泥回流", "B系回流"}, order = 11)
    @ColumnWidth(12)
    private BigDecimal liuLiangYiJiWuNiB;

    @ExcelColumn(header = {"流量(m³/h)", "二级污泥回流", "A系回流"}, order = 12)
    @ColumnWidth(12)
    private BigDecimal liuLiangErJiWuNiA;

    @ExcelColumn(header = {"流量(m³/h)", "二级污泥回流", "B系回流"}, order = 13)
    @ColumnWidth(12)
    private BigDecimal liuLiangErJiWuNiB;

    @ExcelColumn(header = {"流量(m³/h)", "最终出水"}, order = 14)
    @ColumnWidth(12)
    private BigDecimal liuLiangZuiZhong;

    @ExcelColumn(header = {"温度(℃)", "调节池"}, order = 15)
    @ColumnWidth(12)
    private BigDecimal wenDuTiaoJieChi;

    @ExcelColumn(header = {"温度(℃)", "预曝器"}, order = 16)
    @ColumnWidth(12)
    private BigDecimal wenDuYuBaoChi;

    @ExcelColumn(header = {"温度(℃)", "初沉池"}, order = 17)
    @ColumnWidth(12)
    private BigDecimal wenDuChuChenChi;

    @ExcelColumn(header = {"温度(℃)", "厌氧池", "A系"}, order = 18)
    @ColumnWidth(12)
    private BigDecimal wenDuYanYangA;

    @ExcelColumn(header = {"温度(℃)", "厌氧池", "B系"}, order = 19)
    @ColumnWidth(12)
    private BigDecimal wenDuYanYangB;

    @ExcelColumn(header = {"温度(℃)", "一级缺氧池", "A系"}, order = 20)
    @ColumnWidth(12)
    private BigDecimal wenDuYiJiQueYangA;

    @ExcelColumn(header = {"温度(℃)", "一级缺氧池", "B系"}, order = 21)
    @ColumnWidth(12)
    private BigDecimal wenDuYiJiQueYangB;

    @ExcelColumn(header = {"温度(℃)", "一级好氧池", "A系"}, order = 22)
    @ColumnWidth(12)
    private BigDecimal wenDuYiJiHaoYangA;

    @ExcelColumn(header = {"温度(℃)", "一级好氧池", "B系"}, order = 23)
    @ColumnWidth(12)
    private BigDecimal wenDuYiJiHaoYangB;

    @ExcelColumn(header = {"温度(℃)", "二级缺氧池", "A系"}, order = 24)
    @ColumnWidth(12)
    private BigDecimal wenDuErJiQueYangA;

    @ExcelColumn(header = {"温度(℃)", "二级缺氧池", "B系"}, order = 25)
    @ColumnWidth(12)
    private BigDecimal wenDuErJiQueYangB;

    @ExcelColumn(header = {"温度(℃)", "二级好氧池", "A系"}, order = 26)
    @ColumnWidth(12)
    private BigDecimal wenDuErJiHaoYangA;

    @ExcelColumn(header = {"温度(℃)", "二级好氧池", "B系"}, order = 27)
    @ColumnWidth(12)
    private BigDecimal wenDuErJiHaoYangB;


    @ExcelColumn(header = {"溶解氧", "一级缺氧池", "A系"}, order = 28)
    @ColumnWidth(12)
    private BigDecimal rongJieYiJiQueYangA;

    @ExcelColumn(header = {"溶解氧", "一级缺氧池", "B系"}, order = 29)
    @ColumnWidth(12)
    private BigDecimal rongJieYiJiQueYangB;

    @ExcelColumn(header = {"溶解氧", "一级好氧池", "A系"}, order = 30)
    @ColumnWidth(12)
    private BigDecimal rongJieYiJiHaoYangA;

    @ExcelColumn(header = {"溶解氧", "一级好氧池", "B系"}, order = 31)
    @ColumnWidth(12)
    private BigDecimal rongJieYiJiHaoYangB;

    @ExcelColumn(header = {"溶解氧", "二级缺氧池", "A系"}, order = 32)
    @ColumnWidth(12)
    private BigDecimal rongJieErJiQueYangA;

    @ExcelColumn(header = {"溶解氧", "二级缺氧池", "B系"}, order = 33)
    @ColumnWidth(12)
    private BigDecimal rongJieErJiQueYangB;

    @ExcelColumn(header = {"溶解氧", "二级好氧池", "A系"}, order = 34)
    @ColumnWidth(12)
    private BigDecimal rongJieErJiHaoYangA;

    @ExcelColumn(header = {"溶解氧", "二级好氧池", "B系"}, order = 35)
    @ColumnWidth(12)
    private BigDecimal rongJieErJiHaoYangB;


    @ExcelColumn(header = {"污泥浓度", "一级好氧池", "A系"}, order = 36)
    @ColumnWidth(12)
    private BigDecimal wuNiYiJiHaoYangA;

    @ExcelColumn(header = {"污泥浓度", "一级好氧池", "B系"}, order = 37)
    @ColumnWidth(12)
    private BigDecimal wuNiYiJiHaoYangB;

    @ExcelColumn(header = {"污泥浓度", "一级回流污泥", "A系"}, order = 38)
    @ColumnWidth(12)
    private BigDecimal wuNiYiJiHuiLiuA;

    @ExcelColumn(header = {"污泥浓度", "一级回流污泥", "B系"}, order = 39)
    @ColumnWidth(12)
    private BigDecimal wuNiYiJiHuiLiuB;

    @ExcelColumn(header = {"污泥浓度", "二级好氧池", "A系"}, order = 40)
    @ColumnWidth(12)
    private BigDecimal wuNiErJiHaoYangA;

    @ExcelColumn(header = {"污泥浓度", "二级好氧池", "B系"}, order = 41)
    @ColumnWidth(12)
    private BigDecimal wuNiErJiHaoYangB;

    @ExcelColumn(header = {"污泥浓度", "二级回流污泥", "A系"}, order = 42)
    @ColumnWidth(12)
    private BigDecimal wuNiErJiHuiLiuA;

    @ExcelColumn(header = {"污泥浓度", "二级回流污泥", "B系"}, order = 43)
    @ColumnWidth(12)
    private BigDecimal wuNiErJiHuiLiuB;




    @ExcelColumn(header = {"污泥沉降比SV30", "一级好氧池", "A系"}, order = 44)
    @ColumnWidth(12)
    private BigDecimal wuNiJiangChenYiJiHaoYangA;

    @ExcelColumn(header = {"污泥沉降比SV30", "一级好氧池", "B系"}, order = 45)
    @ColumnWidth(12)
    private BigDecimal wuNiJiangChenYiJiHaoYangB;

    @ExcelColumn(header = {"污泥沉降比SV30", "一级回流污泥", "A系"}, order = 46)
    @ColumnWidth(12)
    private BigDecimal wuNiJiangChenYiJiHuiLiuA;

    @ExcelColumn(header = {"污泥沉降比SV30", "一级回流污泥", "B系"}, order = 47)
    @ColumnWidth(12)
    private BigDecimal wuNiJiangChenYiJiHuiLiuB;

    @ExcelColumn(header = {"污泥沉降比SV30", "二级好氧池", "A系"}, order = 48)
    @ColumnWidth(12)
    private BigDecimal wuNiJiangChenErJiHaoYangA;

    @ExcelColumn(header = {"污泥沉降比SV30", "二级好氧池", "B系"}, order = 49)
    @ColumnWidth(12)
    private BigDecimal wuNiJiangChenErJiHaoYangB;

    @ExcelColumn(header = {"污泥沉降比SV30", "二级回流污泥", "A系"}, order = 50)
    @ColumnWidth(12)
    private BigDecimal wuNiJiangChenErJiHuiLiuA;

    @ExcelColumn(header = {"污泥沉降比SV30", "二级回流污泥", "B系"}, order = 51)
    @ColumnWidth(12)
    private BigDecimal wuNiJiangChenErJiHuiLiuB;


    @ExcelColumn(header = {"剩余污泥量排放量", "一级二沉池", "A系"}, order = 52)
    @ColumnWidth(12)
    private BigDecimal shengYuWuNiYiJiErChenA;

    @ExcelColumn(header = {"剩余污泥量排放量", "一级二沉池", "B系"}, order = 53)
    @ColumnWidth(12)
    private BigDecimal shengYuWuNiYiJiErChenB;

    @ExcelColumn(header = {"剩余污泥量排放量", "二级二沉池", "A系"}, order = 54)
    @ColumnWidth(12)
    private BigDecimal shengYuWuNiErJiErChenA;

    @ExcelColumn(header = {"剩余污泥量排放量", "二级二沉池", "B系"}, order = 55)
    @ColumnWidth(12)
    private BigDecimal shengYuWuNiErJiErChenB;

    private BigDecimal parseBigDecimal(String value) {
        if (value == null || value.trim().isEmpty() || value.equals("-")) {
            return null;
        }
        try {
            return new BigDecimal(value.trim());
        } catch (NumberFormatException e) {
            // 记录日志或抛出异常，根据实际需求处理
            System.err.println("数值格式错误: " + value);
            return null;
        }
    }

}
